/**
 * @description: Login interface parameters
 */
export interface LoginParams {
  username: string;
  password: string;
}

export interface RoleInfo {
  roleName: string;
  value: string;
}

/**
 * @description: Login interface return value
 */
export interface LoginResultModel {
  userId: string | number;
  token: string;
  role: RoleInfo;
}

/**
 * @description: Get user information return value
 */
export interface GetUserInfoModel {
  roles: RoleInfo[];
  // 用户id
  userId: string | number;
  // 用户名
  username: string;
  // 真实名字
  realName: string;
  // 头像
  avatar: string;
  // 介绍
  desc?: string;
}

/**
 * @description: Get user role parameters after redirecting to the media page
 */
export interface JumpLoginParams {
  tenantCode: string;
  userId: string;
  userName: string;
  token: string;
  tokenType: 'session' | 'local';
  appType: 1 | 2 | 3;
  localToken: string;
  consoleDomain: string;
}

/**
 * @description: Get user role returned value
 */
export interface JumpLoginResultModel {
  // token: string;
  roles: string[];
}

export type Label = {
  category: string;
  categoryName: string;
  name: string;
  code: string;
  parentCode: string;
};

export interface LabelListItem {
  industry: Label[];
  location: Label[];
  channel: Label[];
}

/**
 * @description: New enterprise registery info
 */
export interface SaaSRegisterParams {
  name: string;
  userName: string;
  password: string;
  phone: string;
  industry: string;
  location: string;
  channel: string;
  email: string;
  alias: string;
  type: number;
  expireTime: string;
  expireTimeDjs: any;
  enabled: boolean;
  deployStrategy: string;
  filesObj: any;
  files: any;
}

export type SaaSLogOutParams = {
  env: string;
  app: string;
};

export interface SaaSLoginParams {
  userName?: string;
  password?: string;
  verificationCode?: string;
}

export interface getAllAppParams {
  userId: string;
  tenantCode: string;
}

export interface ChooseAppParams {
  appId: string;
  tenantCode: string;
  userId: string;
  sessionId: string;
}

export interface oauthLogoutParams {
  cookies: Recordable[];
}

export interface SlLogoutParams {
  tenantName: string;
  userId: string;
}
